home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / psion / amigancp.lha / AmigaNCP010b / Install-AmigaNCP < prev    next >
Text File  |  1994-10-19  |  3KB  |  191 lines

  1. ;
  2. ; Installer-Script for AmigaNCP
  3. ;
  4. ; $VER: AmigaNCP-Install 0.3 (19.10.94)
  5. ;
  6.  
  7. ;
  8. ; Strings
  9.  
  10. (set #install-msg
  11. (cat    "Where do you want AmigaNCP be installed?\nA drawer named"
  12.         "'AmigaNCP' will be automatically created."
  13. ))
  14.  
  15. (set #copylib-msg "Installing ncp.library")
  16. (set #copylib-where "Please select a directory for \"ncp.library\".")
  17. (set #copycat-msg "Installing catalogs")
  18. (set #copycat-where "Please select a directory for the language catalogs.")
  19. (set #copyserv-msg "Installing NCP Services")
  20. (set #copydoc-msg "Installing Docs")
  21. (set #copytools-msg "Installing Tools")
  22.  
  23. (set #wantdev-msg 
  24. (cat    "Do you want to install the Developer\n"
  25.         "Documentation and associated support files?\n\n"
  26.         "These files are needed only when you want\n"
  27.         "to develop applications using \"ncp.library\".\n"
  28. ))
  29. (set #copydev-msg "Copying Developer files")
  30. (set #whats "What Psion computer do you own?")
  31. (set #need20 "AmigaNCP requires OS 2.04 or better!" )
  32.  
  33. ;
  34. ; Determine if running on an 68020++
  35. ;
  36. (procedure checkv20
  37.     (if (>= (database "cpu") 68020 )
  38.         (set v20-flag 1)
  39.     )
  40. )
  41. ;
  42. ;
  43. ; GO!
  44. ;
  45. ;
  46. (set vernum (getversion "LIBS:version.library"))
  47. (set ver (/ vernum 65536 ) )
  48. (set rev (- vernum (* ver 65536 ) ) )
  49.  
  50. (if (< ver 37 )
  51. (
  52.     (abort #need20)
  53. ))
  54. (welcome)
  55. (set default-dest
  56.     (askdir
  57.         (prompt #install-msg)
  58.         (help @askdir-help)
  59.         (default @default-dest)
  60.     )
  61. )
  62. (complete 1)
  63. (set @default-dest
  64.     (tackon default-dest "AmigaNCP")
  65. )
  66. (makedir @default-dest (infos))
  67. (makedir (tackon @default-dest "Docs" ) (infos))
  68. (makedir (tackon @default-dest "Tools" ) (infos))
  69. (complete 2)
  70. ;
  71. ; Copy lib
  72. ;
  73. (set #libname "libs/ncp.library")
  74. (checkv20)
  75. (if v20-flag
  76. (
  77.     (set #libname "libs/ncp.library.020")
  78. ))
  79. (copylib
  80.     (help @copylib-help)
  81.     (prompt #copylib-msg)
  82.     (confirm)
  83.     (source #libname)
  84.     (newname "ncp.library")
  85.     (dest
  86.         (askdir
  87.             (prompt #copylib-where)
  88.             (help @askdir-help)
  89.             (default "LIBS:")
  90.         )
  91.     )
  92. )
  93. (complete 10)
  94. (if (> ver 37 )
  95. (
  96.     (copyfiles
  97.         (source "Catalogs")
  98.         (prompt #copycat-msg)
  99.         (help @copyfiles-help)
  100.         (dest
  101.             (askdir
  102.                 (prompt #copycat-where)
  103.                 (help @askdir-help)
  104.                 (default "LOCALE:Catalogs")
  105.             )
  106.         )
  107.         (confirm)
  108.         (all)
  109.     )
  110. ))
  111. (complete 20)
  112. (copyfiles
  113.     (source "")
  114.     (pattern "AmigaNCP#?")
  115.     (prompt #copyserv-msg)
  116.     (help @copyfiles-help)
  117.     (confirm)
  118.     (infos)
  119.     (dest @default-dest)
  120. )
  121. (foreach "" "AmigaNCP#?"
  122.     (tooltype (
  123.         (dest (tackon @default-dest @each-name ) )
  124.         (noposition)
  125.     )
  126. ))
  127. (complete 40)
  128. (copyfiles
  129.     (source "Docs")
  130.     (prompt #copydoc-msg)
  131.     (help @copyfiles-help)
  132.     (confirm)
  133.     (infos)
  134.     (all)
  135.     (dest (tackon @default-dest "Docs" ) )
  136. )
  137. (complete 60)
  138. (copyfiles
  139.     (source "Tools")
  140.     (prompt #copytools-msg)
  141.     (help @copyfiles-help)
  142.     (confirm)
  143.     (infos)
  144.     (all)
  145.     (dest (tackon @default-dest "Tools" ) )
  146. )
  147. (complete 70)
  148. (if (askbool
  149.         (prompt #wantdev-msg)
  150.         (help #wantdev-msg)
  151.         (default 1)
  152.     )
  153. (
  154.     (set devdir (tackon @default-dest "Developer"))
  155.     (makedir devdir (infos))
  156.     (copyfiles
  157.         (source "Developer")
  158.         (prompt #copydev-msg)
  159.         (help @copyfiles-help)
  160.         (dest devdir)
  161.         (confirm)
  162.         (infos)
  163.         (all)
  164.     )
  165. ))
  166. (complete 90)
  167. (if ( = (exists "ENV:NCP.config") 0 )
  168. (
  169.     (set s3amode (askchoice
  170.         (choices "Psion S3 (or HC)" "Psion S3a (or MC)")
  171.         (default 0 )
  172.         (prompt #whats)
  173.         (help @askchoice-help)
  174.     ))
  175.     (if s3amode (
  176.         (textfile 
  177.             (dest "ENV:NCP.config")
  178.             (append "DEVICE=serial.device UNIT=0 BAUD=19200")
  179.         )
  180.     )
  181.     (
  182.         (textfile 
  183.             (dest "ENV:NCP.config")
  184.             (append "DEVICE=serial.device UNIT=0 BAUD=9600")
  185.         )
  186.     ))
  187.     (run "copy ENV:NCP.config ENVARC:NCP.config")
  188. ))
  189. (complete 100)
  190.